//
//  RCMemberCardSuccessTakeVC.m
//  RocketProject
//
//  Created by chen jiedan on 13-8-23.
//  Copyright (c) 2013年 Rocket. All rights reserved.
//

#import "RCMemberCardSuccessTakeVC.h"
#import "CommonDefines.h"
#import "UIColor-Expanded.h"

@interface RCMemberCardSuccessTakeVC (){
    BOOL isForGoods;
}

@end

@implementation RCMemberCardSuccessTakeVC

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (id) initWithForGoods:(BOOL)forGoods
{
    self = [super init];
    if (self) {
        isForGoods = YES;
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.
    
    self.titleLabelText = @"会员卡";
    self.navigationItem.titleView = [self createTitleView];
    
    
    UIImageView *smileImgView = [[UIImageView alloc] initWithFrame:CGRectMake(80, 100, 0, 0)];
    UIImage *img = [UIImage imageNamed:@"image_member_takeSuccess"];
    CGRect frame = smileImgView.frame;
    smileImgView.image = img;
    frame.size.height = img.size.height, frame.size.width = img.size.width;
    smileImgView.frame = frame;
    [self.viewContainer addSubview:smileImgView];
    [smileImgView release];
    
    UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(120, 110, 140, 20)];
    if (isForGoods) {
        label1.text = @"恭喜您兑换成功";
    }else{
        label1.text = @"恭喜您认领成功";
    }
    label1.backgroundColor = [UIColor clearColor];
    label1.font = [UIFont fontWithName:kFontNameHelvetica size:18];
    label1.textColor = kNormalHeadTextColor;
    [self.viewContainer addSubview:label1];
    [label1 release];
    
    UILabel *label2 = [[UILabel alloc] initWithFrame:CGRectMake(80, 150, 200, 20)];
    if (isForGoods) {
        label2.text = @"请到个人中心我的订单查看";
    }else{
        label2.text = @"我们会为您尽快送卡上门";
    }
    label2.backgroundColor = [UIColor clearColor];
    label2.font = [UIFont fontWithName:kFontNameHelvetica size:15];
    label2.textColor = kNormalTextColor;
    [self.viewContainer addSubview:label2];
    [label2 release];
    
    
    UIButton *backBtn = [[UIButton alloc] initWithFrame:CGRectMake(14, 185, 320-28, 40)];
    [backBtn setTitle:@"返回" forState:UIControlStateNormal];
    [self.viewContainer addSubview:backBtn];
    UIImage *loginIMG = [UIImage imageNamed:@"login_btn"];
    [backBtn setBackgroundImage:loginIMG forState:UIControlStateNormal];
    //        [loginBtn setBackgroundColor:[UIColor blackColor]];
    [backBtn addTarget:self action:@selector(backPress) forControlEvents:UIControlEventTouchUpInside];
    [backBtn release];
    
    
}


- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


- (void) backPress
{
    [self.navigationController popViewControllerAnimated:YES];
}
@end
